Memory controller and memory controlling method

ABSTRACT

A memory controller includes: a first generating unit that generates a read-address to read a data element sequence having a plurality of data elements from a bank of a memory; a second generating unit that generates a position signal indicating a position of a data element to be selected from the data element sequence, and an order signal indicating a storing order for storing the data element to be selected into a register; and a selector unit that selects, according to the position signal, the data element to be selected from the data element sequence read out from each of the plurality of the banks, and stores the selected data element in the storing order indicated by the order signal into the register, wherein the data element stored in the register is processed in the storing order by a vector processor.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2010-288176, filed on Dec. 24,2010, the entire contents of which are incorporated herein by reference.

FIELD

Embodiments discussed herein relate to a memory controller whichcontrols reading data from and/or writing data into a memory, and amethod for controlling a memory.

BACKGROUND

A vector processor is used for a vector process in which a certaincomputation is performed in a repetition to a large amount of data inarrays (for example, U.S. Pat. No. 5,809,552). By the vector processor,data elements in an array are consecutively processed under oneinstruction, and a high computation throughput is obtained. The vectorprocessor has, for example, load/store and computation pipelines. Theload/store pipeline reads data elements from a data memory, and storesthe data elements in a register (referred to as a vector register,hereinafter) in a processing order of the computation pipeline. Thecomputation pipeline, fetching and decoding a computation instructionfor one time, reads data elements consecutively in a sequence from thevector register, and performs an arithmetic computation or the like.Then, the computation pipeline stores the data elements indicating thecomputation results into the vector register in the processing order.Then, the load/store pipeline reads the data elements indicating thecomputation results from the register, and stores the data elements inthe data memory in the processing order.

There is a case that, for example, in a large-capacity data memory suchas a DRAM (Dynamic Random Access Memory), data elements for input arestored at discontinuous addresses. Or, there is a case that the dataelements indicating computation results will be stored at discontinuousaddresses of the data memory. When the load/store pipeline reads thedata elements from the data memory into the vector register, and/orwrites the data elements from the vector register into the data memory,there occur accesses to a wide range of the memory area. This increaseslatency, which can be a factor to strangle the throughput. Also, forexample, in pipelining with a high-speed cache memory such as SRAM(Static Random Access Memory) between the data memory and the vectorregister so as to decrease the latency, there is a concern for anincreasing circuit scale and a high production cost.

SUMMARY

A memory controller in accordance with an embodiment includes: a firstgenerating unit that generates a read-address to read a data elementsequence having a plurality of data elements from a bank of a memory,the memory having a plurality of the banks, from each of which the dataelement sequence is read out in response to an input of theread-address; a second generating unit that generates a position signalindicating a position of a data element to be selected from the dataelement sequence, and an order signal indicating a storing order forstoring the data element to be selected into a register; and a selectorunit that selects, according to the position signal, the data element tobe selected from the data element sequence read out from each of theplurality of the banks, and stores the selected data element in thestoring order indicated by the order signal into the register, whereinthe data element stored in the register is processed in the storingorder by a vector processor.

The object and advantages of the invention will be realized and attainedby means of the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a drawing for depicting a configuration of a vector processorin accordance with an embodiment;

FIGS. 2A and 2B are drawings for depicting processing sequence of vectorpipelines;

FIGS. 3A and 3B are drawings for depicting operations of computationpipelines;

FIGS. 4A through 4C are drawings for schematically depicting transfersof data elements;

FIG. 5 is a drawing for depicting reading/writing of data elements of adata memory;

FIG. 6 is a drawing for depicting a vector register;

FIG. 7 is a drawing for depicting a configuration of a memorycontroller;

FIGS. 8A through 8D are drawings for depicting operation of anorder/position signal generating unit;

FIGS. 9A through 9D are drawings for depicting an example such that abank enable signal is not generated;

FIG. 10 is a drawing for depicting a configuration of a memorycontroller;

FIGS. 11A through 11E are drawings for depicting operations of anorder/position signal generating unit; and

FIGS. 12A through 12E are drawings for depicting an example such that abank enable signal is not generated.

DESCRIPTION OF EMBODIMENTS

Embodiments will be described hereinafter according to the drawings.However, it is noted that the technical scope is not limited to theembodiments described below, but covers the matters described in theclaims and the equivalents thereof.

FIG. 1 is a drawing for depicting the configuration of a vectorprocessor in accordance with the present embodiment.

At a vector processor 1, according to instructions stored in aninstruction memory 2, vector pipelines 12 read out data elements storedin a data memory 6 and perform computations, and write the data elementsindicating the computation results into the data memory 6. The vectorprocessor 1 includes the instruction memory 2, the vector pipeline 12,and the data memory 6, and includes, in addition thereto, a vectorregister 8, a scalar register 10, a multiplexer 14, and an instructiondecoder 4. The vector processor 1 includes, for example, a signalprocessing LSI (Large Scale Integrated circuit).

The instruction memory 2 stores control instructions and computationinstructions for the vector pipeline 12. The instruction memory 2includes, for example, an SRAM. The instruction decoder 4, readinginstructions from the instruction memory 2, decodes the instructions andinputs them into the vector pipelines 12.

The vector pipelines 12 include load/store pipelines 12_1 and 12_2 forload/store processes and computation pipelines 12_3 and 12_4 for variouskinds of computations. The load/store pipelines 12_1 and 12_2, and thecomputation pipelines 12_3 and 12_4 operate according to the controlinstructions and the computation instructions that are input. Theload/store pipelines 12_1 and 12_2 access the data memory 6, andtransfer data elements between the data memory 6 and the vector register8. At this time, the load/store pipelines 12_1 and 12_2, by controllingthe multiplexer 14, make selections of the transferred data elements.The computation pipelines 12_3 and 12_4 read out the data elementsstored in the vector register 8, and execute computations, for example,arithmetic computations such as addition, subtraction, andmultiplication, or a logic computation. Each of the computationpipelines 12_3 and 12_4 has, for example, one or more computing units. Acomputing unit included in the computation pipelines 12_3 and 12_4executes, per one instruction, consecutive computations to the dataelements in arrays.

The data memory 6 stores data elements in arrays. The data memory 6includes, for example, an SRAM. The data elements include data for thecomputations by the computation pipelines 12_3 and 12_4. Also, the dataelements include data indicating the computation results by thecomputation pipelines 12_3 and 12_4. The data memory 6 includes aplurality of banks 6_1, 6_2, 6_3, and 6_4. Each of the banks 6_1 through6_4 has an access port for reading and/or writing data. Addresses of thebanks 6_1 through 6_4 are accessed by interleaving.

The vector register 8 stores the data elements, which have been read outfrom the data memory 6 and will be input into the computation pipelines12_3 and 12_4. Also, the vector register 8 stores the data elements,which have been output from the computation pipelines 12_3 and 12_4 andwill be written into the data memory 6. Additionally, in the scalarregister 8, various kinds of data, other than the data for the vectorprocess, to be input to and/or output from the vector pipeline 12 arestored.

FIGS. 2A and 2B are drawings for depicting process sequences of thevector pipelines 12_1 through 12_4. In FIG. 2A, the process sequence ofthe load/store pipelines 12_1 and 12_2 are depicted. In FIG. 2B, theprocess sequences of the computation pipelines 12_3 and 12_4 aredepicted. In FIGS. 2A and 2B, the vertical axes represent processingstages, and the lateral axes represent the time (process cycle). Here,an example is depicted such that 64 data elements are processedconsecutively in series. The numbers within cells each represent arraynumbers, from 0 to 63, of the data elements to be processed.

As depicted in FIG. 2A, the load/store pipelines 12_1 and 12_2 executein series and in parallel 6 stages of an instruction, such as “fetch”and “decode” of the instruction, “reg.read” to read out the instructionfrom the register, “execute” to execute the instruction, “mem.access” toaccess the memory, and “writeback” to write the execution result to theregister. Each stage is executed in one process cycle. At this time,“fetch” and “decode” are executed for one time. Then at each stage from“execute” through “writeback”, 8 data elements are processed in seriesin one process cycle.

By the pipeline-process as above, 6-stage process to 64 data elementsare executed in 13 process cycles.

As depicted in FIG. 2B, the computation pipelines 12_3 and 12_4 executein series and in parallel 5 stages of an instruction, such as “fetch”,“decode”, “reg.read”, “execute”, and “writeback”. At this time, “fetch”and “decode” are executed for one time. Then, at each stage from“execute” through “writeback”, 8 data elements are consecutivelyprocessed in one process cycle. By the pipeline-process as above,5-stage process to 64 data elements are executed in 12 process cycles.

FIGS. 3A and 3B are drawings for depicting operations of the computationpipelines 12_3 and 12_4 at the “execute” stage of an instruction. InFIG. 3A, an example is depicted such that the computation pipelines 12_3and 12_4 each have, for example, a single computing unit 30. Thecomputing unit 30 is, for example, a 16-bit computing unit. Here, anexample is depicted such that the computing unit 30 processes 8 pairs ofthe data elements in the order of the array numbers. Each data elementhas, for example, 16-bit data length. The computing unit 30 processes 8pairs of the data elements in one process cycle. The computing unit 30performs arithmetic computations of the data elements In_1[i] andIn_2[i], where i is the array number, in the order of the array number iconsecutively, for example, from i=0 through i=7. Then, the dataelements Out[i] indicating the computation results are output.

In FIG. 3B, an example is depicted such that the computation pipelines12_3 and 12_4 each have, for example, 8 computing units 30_1 through30_8. Each of the computing units 30_1 through 30_8 is, for example, a16-bit computing unit. Here, an example is depicted such that thecomputing units 30_1 to 30_8 process in parallel 8 pairs of 16-bitlength data elements. The computing unit 30_1 to 30_8 performcomputations of the data elements In_1[i] and In_2[i] for the arraynumbers i=0 through 7, for example, at the time of the firstcomputation. Then, data elements Out[i] indicating the computationresults are output. Then, at the time of the second computation, thecomputing units 30_1 through 30_8 each process the data elements for thearray numbers i=8 through 15, in the similar manner. Then, at the timeof the third computation, the computing units 30_1 through 30_8 eachprocess the data elements for the array numbers i=16 through 23, in thesimilar manner. As such, at each execution of the computation, 8 dataelements are processed. Then, at the time of the eighth computation, thecomputing units 30_1 through 8 processes the data elements for the arraynumbers i=56 through 63, in the similar manner. As such, the computingunits 30_1 through 8 execute a cycle of computation to 8 pairs of thedata elements for 8 consecutive times, thus 64 pairs of the dataelements being processed.

As above, the computation pipelines 12_3 and 12_4 perform the fetch andthe decode of a computation instruction at one time, and process thedata elements consecutively in series. Thereby, time for the fetch andthe decode of an instruction is reduced and high throughput is obtained.Also, the computation pipelines 12_3 and 12_4, by having the pluralityof the computing units, and by parallel operations thereof, enable ahigh throughput.

On the other hand, the load/store pipelines 12_1 and 12_2 transfer thedata elements between the data memory 6 and the vector register 8. FIGS.4A to 4C are drawings for schematically depicting the transfers of thedata elements. In FIGS. 4A through 4C, cells of the data memory 6 andthe vector register 8 each represent an address for storing one piece ofdata elements. Also, codes in the cells each represent a data element.

In FIG. 4A, an example is depicted such that the data elements are readout from and/or written to consecutive addresses of the data memory 6.Such a case is referred to as “sequential access”. In the sequentialaccess, the load/store pipelines 12_1 and 12_2 read out, for example,data elements “A1” through “A8”, and “B1” through “B8” from theconsecutive addresses of the data memory 6, and stores the data elementsin the vector register 8 in the processing order of the computationpipelines 12_3 and 12_4. Also, the load/store pipelines 12_1 and 12_2read out the data elements “C1” through “C8” from the vector register 8and writes the data elements into the consecutive addresses of the datamemory 6.

In FIG. 4B, an example is depicted such that the data elements are readout from and/or written to discrete addresses of the data memory 6. Sucha case is referred to as a “stride access”. The stride access isperformed, for example, when the data elements arranged with a certaininterval are subtracted and processed. For example, applicable case isprocessing the data elements of even array numbers, or processing thedata elements of the array numbers at a certain interval. In the strideaccess, the load/store pipelines 12_1 and 12_2 read, for example, thedata elements “A1” through “A8” and “B1” through “B8” from discreteaddresses of the data memory 6 into the vector register 8 in theprocessing order. Also, the load/store pipelines 12_1 and 12_2 read thedata elements “C1” through “C8” from the vector register 8 and write thedata elements into discrete addresses of the data memory 6.

In FIG. 4C, an example is depicted such that the data elements are readout from and/or written to scattered addresses at the data memory 6.Such a case is referred to as an “indirect access”. The indirect accessis performed, for example, when scattered data elements are processed.In the indirect access, the load/store pipelines 12_1 and 12_2 read out,for example, the data elements “A1” through “A8”, and “B1” through “B8”from scattered addresses of the data memory 6, and store the dataelements into the vector register 8 in the processing order. Also, theload/store pipelines 12_1 and 12_2 read the data elements “C1” through“C8” out from the vector register 8, and write the data elements intoscattered addresses of the data memory 6.

In the above, in the order of the sequential access, the stride access,and the indirect access, the address range to be accessed becomes wider.Along with this, the number of accesses increases, thus the probabilityof memory latency increases. In the present embodiment, the memorylatency is suppressed in the following manner, so as to achieve apreferable throughput.

FIG. 5 is a drawing for depicting reading and writing the data elementsat the data memory 6. The data memory 6 has a plurality of banks, forexample, the banks 6_1 through 6_4, which are accessed by interleaving.The banks 6_1 through 6_4 each have, for example, the 128-bit bankwidth. Cells each represent a 16-bit length storage area, and numbers inthe cells each indicate the data elements. As such, in one bank width,eight pieces of 16-bit length data elements are stored.

From each of the banks 6_1 through 6_4, in response to input of aread-address, for example, a data element sequence having 8 dataelements is read. Or, to each of the banks 6_1 through 6_4, for example,a data element sequence having 8 data elements is written at awrite-address. For example, at the bank 6_1, a data element sequence R1having data elements “0” through “7” is read out from and/or written tothe address ADD1 by one access. Also, at the bank 6_2, a data elementsequence R2 having data elements “40” through “47” is read out fromand/or written to the address ADD2 by one access. Also, at the bank 6_3,a data element sequence R3 having data elements “80” through “87” isread out from and/or written to the address ADD3 by one access. Then, atthe bank 6_4, a data element sequence R4 having data elements “120”through “127” is read out from and/or written to the address ADD4 by oneaccess. As above, the data memory 6 as a whole, the data elementsequences R1 through R4 having 32 data elements are read out and/orwritten by one access.

FIG. 6 is a drawing for depicting the vector register 8. At the vectorregister 8, the data elements for computations, or the data elementsindicating the computation results are stored in a processing order ofthe computation pipelines 12_1 and 12_2. The vector register 8 has, forexample, 128-bit width, and has 8 pieces of 16-bit length data elementsstored at one row-address. Here, each cell represents a storage area of16-bit length, and a number within the cell indicates the array numbersof the data elements stored therein.

For example, as depicted in FIG. 3A, when the computation pipelines 12_1and 12_2 processes 8 pairs of the data elements by one computing unit inone process cycle, the data elements as described bellow are stored inthe vector register 8. For example, at a pair of row-addresses, pairs ofthe data elements to be input in series into the computing unit arestored in the processing order, and at another row-address, the dataelements indicating the computation results are stored in the processingorder.

As above, at the banks 6_1 through 6_4 as a whole, the data elementsequences R1 through R4, each of which includes 32 data elements, areread out and/or written by interleaving by one access. Thereby, latencyis suppressed. On the other hand, in the vector register 8, 8 dataelements for a computation or the data elements indicating thecomputation results are stored at one row-address. Hereinafter, the dataelements stored in the vector register 8 are referred to as “computationdata element”, to differentiate from other data elements stored in thedata memory 6). Accordingly, in accordance with the present embodiment,in the manner as described bellow, 8 computation data elements to bestored in the vector register 8 are selected from 32 data elementsincluded in the data element sequences R1 through R4 read out from thebanks 6_1 through 6_4. Also, 8 computation data elements stored in thevector register 8 are inserted into the data element sequences R1through R4 to be written into the banks 6_1 through 6_4 by one access,thus being written into the data memory 6.

Below, with regard to the memory controller in accordance with thepresent embodiment, an explanations will be made for an example of thecomputation data elements being read out from the data memory 6 andstored into the vector register 8, and for an example of the computationdata elements being read out from the vector register 8 and written intothe data memory 6.

<Example of Computation Data Elements being Read Out from the DataMemory 6 and Stored into the Vector Register 8>

In FIG. 7, a configuration of the memory controller for readingcomputation data elements from the data memory 6 and storing thecomputation data elements into the vector register 8 is depicted. Thememory controller has an address generating unit 30, which generates theread-address rADD of each of the banks 6_1 through 6_4 of the datamemory 6 so as to read the data element sequences R1 through R4. Theaddress generating unit 30 is, for example, a module within theload/store pipelines 12_1 and 12_2. The address generating unit 30generates the read-address rADD on the basis of the address generatingdata 4 a input from the instruction decoder 4. The address generatingunit 30 has, for example, a sequential address generating unit 30_1 forgenerating read-addresses for the sequential access, an indirect addressgenerating unit 30_2 for generating read-addresses for the indirectaccess, and a stride address generating unit 30_3 for generatingread-addresses for the stride access. The read-address rADD for each ofthe banks 6_1 through 6_4, generated by the address generating unit 30,is input into each of the banks 6_1 through 6_4 of the data memory 6. Onthe other hand, at the address generating unit 30, for example, variouskinds of processing signals PS are generated by the sequential addressgenerating unit 30_1, the indirect address generating unit 30_2, and thestride address generating unit 30_3. Then, the read-address rADDs forthe banks 6_1 through 6_4 and the various kinds of processing signals PSare stored into the register 31.

The memory controller has an order/position signal generating unit 32,which generates the position signal S4 indicating positions of thecomputation data elements at the data element sequences R1 through R4,and an order signal S6 indicating the storing order by which thecomputation data elements are stored in the register. The order/positionsignal generating unit 32 is, for example, a module within themultiplexer 14. The order/position signal generating unit 32 reads theread-address rADDs and the various kinds of processing signals PS storedin the register 31, and, on the basis thereof, generates the positionsignal S4 and the order signal S6. The detail will be explained below.

Also, the memory controller has a selector unit 34 which selects thecomputation data elements, according to the position signal S4, fromamong the data element sequences R1 through R4 read out from theplurality of the banks 6_1 through 6_4, and stores the selectedcomputation data elements into the vector register 8 in the storingorder indicated by the order signal S6. The selector unit 34 is, forexample, included within the multiplexer 14. The selector unit 34 has,for example, selectors 34_1 through 34_8 for 8 storing positions at thevector register 8. To each of the selectors 34_1 through 34_8, 32 dataelements of the data element sequences R1 through R4 are input. Then,the selectors 34_1 through 34_8 each select a computation data elementfrom 32 data elements to store into a position which each selectorcorresponds to, according to the position signal S4 and the order signalS6, and store the selected computation data elements into the vectorregister 8.

FIG. 8 is a diagram for depicting detail operations of theorder/position signal generating unit 32. Here, an example is depictedsuch that the computation data elements “A”, “B”, “C”, “D”, “E”, “F”,“G”, and “H” are stored in that order into the vector register 8. InFIG. 8A, an example is depicted such that 8 computation data elements“A” through “H” are stored in scattered manner in the banks 6_1 through6_4. Also, in FIG. 8A, the read-addresses for the data element sequencesR1 through R4 including the computation data elements “A” through “H”are depicted. Here, the addresses increase from right to left, and topto bottom of the drawing. The order of the read-addresses of each of thebanks 6_1 through 6_4 correspond to the storing order of the computationdata elements “A” through “H” in the vector register 8, included in thedata element sequences R1 through R4 which are to be read, in otherwords, the processing order by the computation pipelines 12_3 and 12_4.For example, as depicted in the order of the addresses, the data elementsequence R4 including the computation data element “A” is stored in thebank 6_4 at the address “0x30”. Also, in the bank 6_1, the data elementsequence R1 including the computation data elements “B” and “C” arestored at the address “0x40”. Also, in the bank 6_2, the data elementsequence R2 including the computation data elements “D”, “E”, and “F”are stored at the address “0x50”. Then, in the bank 6_3, the dataelement sequence R3 including the computation data elements “G” and “H”are stored at the address “0x60”.

In FIG. 8B, the read-address rADDs of the banks 6_1 through 6_4generated by the address generating unit 30 are depicted. For example,for the bank 6_1, the read-address “0x40” is generated. Also, for thebank 6_2, the read-address “0x50” is generated. Also, for the bank 6_3,the read-address “0x60” is generated. Then, for the bank 6_4, theread-address “0x30” is generated.

In FIG. 8B, various kinds of processing signals PS generated by theaddress generating unit 30 are depicted. The various kinds of processingsignals PS include a bank enable signal BE, an element enable signal EE,and a bank offset signal BO. The bank enable signal BEs, the elementenable signal EEs, and the bank offset signal BOs are generated on thebasis of the read-address rADD.

The bank enable signal BE indicates the validity of the read-addressrADD of each of the banks 6_1 through 6_4. The bank enable signal BE is,for example, a 1-bit signal. When the read-address rADD is generated,the bank enable signal BE has the value of “1” for indicating thevalidity. On the other hand, when the read-address rADD is notgenerated, the bank enable signal BE has the value of “0”. Here, theread-address rADDs are generated for all of the banks 6_1 through 6_4.Accordingly, for all of the banks 6_1 through 6_4, the bank enablesignal BEs of the value “1” indicating the validity of the read-addressrADDs are generated.

The element enable signal EE indicates the positions of the computationdata elements to be selected among the data element sequences R1 throughR4. The data element sequences R1 through R4 each include 8 dataelements. Accordingly, the element enable signal for each of the dataelement sequences R1 through R4 is, for example, an 8-bit signal. Here,for example, the computation data elements “B” and “C” are respectivelyincluded in the data element sequence R1 at the first and the secondcolumn, counted along the sequence from the right to the left of thedrawing. Accordingly, the value of the element enable signal EEcorresponding to the data element sequence R1 is, respectively from thefirst to the eighth column, “1, 1, 0, 0, 0, 0, 0, 0”. Also, in the dataelement sequence R2, the computation data elements “D”, “E”, and “F” areincluded from the second to the fourth columns. Accordingly, the valueof the element enable signal EE corresponding to the data elementsequence R2 is, respectively from the first to the eighth column, “0, 1,1, 1, 0, 0, 0, 0”. Also, in the data element sequence R3, thecomputation data elements “G” and “H” are included at the fourth and thefifth column. Accordingly, the value of the element enable signal EEcorresponding to the data element sequence R3 is, respectively from thefirst to the eighth column, “0, 0, 0, 1, 1, 0, 0, 0”. And, in the dataelement sequence R4, the computation data element “A” is included in theeighth column. Accordingly, the value of the element enable signal EEcorresponding to the data element sequence R4 is, respectively from thefirst to the eighth column, “0, 0, 0, 0, 0, 0, 0, 1”.

The bank offset signal BO indicates the order of the banks 6_1 through6_4 corresponding to the processing order of the computation dataelements included in the data element sequences R1 through R4. The valueof the bank offset signal BO is obtained, in the manner as describedbelow, from the order of the read-address rADD of the banks 6_1 through6_4 and the accumulated value of the element enable signal EE.

First, the order of the read-address rADDs of the banks 6_1 through 6_4,is in the ascending order, as follows.

-   <NUMBER 1> the read-address rADD (“0x30”) of the bank 6_4-   <NUMBER 2> the read-address rADD (“0x40”) of the bank 6_1-   <NUMBER 3> the read-address rADD (“0x50”) of the bank 6_2-   <NUMBER 4> the read-address rADD (“0x60”) of the bank 6_3

Also, the accumulated value of the element enable signal EE of the eachbank in the above order are as follows.

<NUMBER 1>

-   the accumulated value of the element enable signal EE of the bank    6_4, “1”    <NUMBER 2>-   the accumulated value of the element enable signal EE of the bank    6_1, “2”    <NUMBER 3>-   the accumulated value of the element enable signal EE of the bank    6_2, “3”    <NUMBER 4>-   the accumulated value of the element enable signal EE of the bank    6_3, “2”

And the value of the bank offset signal BO of each bank is obtained as asum of the value of the bank offset signal BO and the accumulated valueof the value of the enable signal EE of the bank in the previous order.An example is described below.

<NUMBER 1>

-   the bank offset signal BO of the bank 6_4=“0”    <NUMBER 2>-   the bank offset signal BO of the bank 6_1-   =the bank offset signal BO of the bank 6_4, “0”,-   +the accumulated value of the element enable signal EE of the bank    6_4, “1”-   =“1”    <NUMBER 3>-   The bank offset signal BO of the bank 6_2-   =the bank offset signal BO of the bank 6_1, “1”-   +the accumulated value of the element enable signal EE the bank 6_1,    “2”-   =“3”    <NUMBER 4>-   The bank offset signal BO of the bank 6_3-   =the bank offset signal BO of the bank 6_2, “3”-   +the accumulated value of the element enable signal EE of the bank    6_2, “3”-   =“6”

In FIG. 8C, the element offset signal EOs, the order signal S6 s, andthe position signal S4 s generated by the order/position signalgenerating unit 32 for the banks 6_1 through 6_4 are depicted.

The element offset signal EO indicates the order of the computation dataelements to be selected of each of the data element sequences R1 throughR4. The value of the element offset signal EO is obtained byaccumulating the value of the element enable signal EE of each of thebanks 6_1 through 6_4 in the address order. An example is describedbelow.

<BANK 6_1>

-   the element offset signal EO of the computation data element “B”-   =the element enable signal EE of the computation data element “B”,    “1”-   the element offset signal EO of the computation data element “C”-   =the element offset signal EO of the computation data element “B”,    “1”-   +the element enable signal EE of the computation data element “C”,    “1”-   =“2”    <BANK 6_2>-   the element offset signal EO of the computation data element “D”-   =the element enable signal EE of the computation data element “D”,    “1”-   the element offset signal EO of the computation data element “E”-   =the element offset signal EO of the computation data element “D”,    “1”-   +the element enable signal EE of the computation data element “E”,    “1”-   =“2”-   the element offset signal EO of the computation data element “F”-   =the element offset signal EO of the computation data element “E”,    “2”-   +the element enable signal EE of the computation data element “F”,    “1”-   =“3”    <BANK 6_3>-   the element offset signal EO of the computation data element “G”-   =the element enable signal EE of the computation data element “G”,    “1”-   the element offset signal EO of the computation data element “H”-   =the element offset signal EO of the computation data element “G”,    “1”-   +the element enable signal EE of the computation data element “H”,    “1”-   =“2”    <BANK 6_4>-   the element offset signal EO of the computation data element “A”-   =the element enable signal EE of the computation data element “A”,    “1”

Next, the order signal S6 s indicate the storing positions of thecomputation data elements at the vector register 8. The value of theorder signal S6 is obtained as the sum of the value of the bank offsetsignal BO of the bank, which the computation data elements correspondsto, and the value of the element offset signal EO of the computationdata element. An example is described below.

<BANK 6_1>

-   the order signal S6 of the computation data element “B”-   =the bank offset signal BO of the bank 6_1, “1”-   +the element offset signal EO of the computation data element “B”,    “1”-   =“2”-   the order signal S6 of the computation data element “C”-   =the bank offset signal BO of the bank 6_1, “1”-   +the element offset signal EO of the computation data element “C”,    “2”-   =“3”    <BANK 6_2>-   the order signal S6 of the computation data element “D”-   =the bank offset signal BO of the bank 6_2, “3”-   +the element offset signal EO of the computation data element “D”,    “1”-   =“4”-   the order signal S6 of the computation data element “E”-   =the bank offset signal BO of the bank 6_2, “3”-   +the element offset signal EO of the computation data element “E”,    “2”-   =“5”-   the order signal S6 of the computation data element “F”-   =the bank offset signal BO of the bank 6_2, “3”-   +the element offset signal EO of the computation data element “D”,    “3”-   =“6”    <BANK 6_3>-   the order signal S6 of the computation data element “G”-   =the bank offset signal BO of the bank 6_3, “6”-   +the element offset signal EO of the computation data element “D”,    “1”-   =“7”-   the order signal S6 of the computation data element “H”-   =the bank offset signal BO of the bank 6_2, “6”-   +the element offset signal EO of the computation data element “E”,    “2”-   =“8”    <BANK 6_4>-   the order signal S6 of the computation data element “A”-   =the bank offset signal BO of the bank 6_3, “0”-   +the element offset signal EO of the computation data element “D”,    “1”-   =“1”

Here, with the computation data elements, “A”, “B”, “C”, “D”, “E”, “F”,“G”, and “H”, the storing order numbers of the vector register 8, suchas “1”, “2”, “3”, “4”, “5”, “6”, “7”, and “8”, are each associated.

The position signal S4 indicates the positions of the computation dataelements “A” through “H” among 32 data elements included in the dataelement sequences R1 through R4. For example, 32 data elements areassumed to be put in the address order such as the data element sequenceR1, R2, R3, and R4, and are provided ascendant orders from “0” through“31”. And, to the computation data elements “A” through “H” to which theorder signal S6 s are assigned, any of the corresponding position signalS4 s from “1” through “32” is assigned. An example of the assignment isas follows.

<Data Element Sequence R1>

-   the computation data element “B”: the order signal “2”, the position    signal “0”.-   the computation data element “C”: the order signal “3”, the position    signal “1”    <Data Element Sequence R2>-   the computation data element “D”: the order signal “4”, the position    signal “9”-   the computation data element “E”: the order signal “5”, the position    signal “10”-   the computation data element “F”: the order signal “6”, the position    signal “11”    <Data Element Sequence R3>-   the computation data element “G”: the order signal “7”, the position    signal “19”-   the computation data element “H”: the order signal “8”, the position    signal “20”    <Data Element Sequence R4>-   the computation data element “A”: the order signal “1”, the position    signal “31”

Here, with the computation data elements “A”, “B”, “C”, “D”, “E”, “F”,“G”, and “H”, storing order numbers of the vector register 8, such as“1”, “2”, “3”, “4”, “5”, “6”, “7”, and “8”, and positions at the dataelements R1, R2, R3, and R4 are each associated.

Next, with reference to FIG. 7 and FIG. 8, the operation of the selectorunit 34 is explained. The selector unit 34 selects the computation dataelements from the data element sequences R1 through R4 according to theposition signal S4 s, and stores the selected data elements into thevector register 8 in the storing order indicated by the order signal S6s. An example is described as below. The selectors 34_1 through 34_8each correspond to the storing order “1” through “8” of the storingpositions of the vector register 8. And, to each of the selectors 34_1through 34_8, 32 data elements of the data element sequences R1 throughR4 are input. Then, selectors 34_1 through 34_8 each select thecomputation data elements from 32 data elements to be stored at astoring position to which each selector corresponds to, according to theposition signal S4 s and the order signal S6 s, and store the selectedcomputation data elements into the vector register 8. For example, thestoring order to which the selectors 34_1 through 34_8 corresponds to,the association of the value of the order signal S6, the value of theposition signal S4, and the data elements to be stored are associatedwith one another as described in the following.

-   the selector 34_1: the storing order “1”, the order signal “1”, the    position signal “31”, the computation data element “A”-   the selector 34_2: the storing order “2”, the order signal “2”, the    position signal “0”, the computation data element “B”-   the selector 34_3: the storing order “3”, the order signal “3”, the    position signal “1”, the computation data element “C”-   the selector 34_4: the storing order “4”, the order signal “4”, the    position signal “9”, the computation data element “D”-   the selector 34_5: the storing order “5”, the order signal “5”, the    position signal “10”, the computation data element “E”-   the selector 34_6: the storing order “6”, the order signal “6”, the    position signal “11”, the computation data element “F”-   the selector 34_7: the storing order “7”, the order signal “7”, the    position signal “19”, the computation data element “G”-   the selector 34_8: the storing order “8”, the order signal “8”, the    position signal “20”, the computation data element “H”    As such, the computation data elements “A” through “H” are selected    from the data element sequences R1 through R4 read out from the    banks 6_1 through 6_4. Then, as depicted in FIG. 8D, the computation    data elements “A” through “H” are stored in the vector register 8    according to the storing order.

According to the present embodiment, from the banks 6_1 through 6_4, thedata element sequences R1 through R4 including 32 data elements are readby one access. Accordingly, the latency is suppressed. On the otherhand, in the above described manner, 8 computation data elements to bestored in the vector register 8 are selected from 32 data elements ofthe data element sequences R1 through R4, and stored in the vectorregister in the processing order. Accordingly, at the computationpipelines 12_3 and 12_4, the data elements are processed consecutively,therefore, a preferable throughput is obtained.

Additionally, the order/position signal generating unit 32 transfers thebank enable signal BEs, which are sent from the address generating unit30, to the selector unit 34. Thereby, when the data element sequence isread out from the bank to which the bank enable signal BE is generated,the selector unit 34 selects the computation data elements from the dataelement sequences which are read. On the other hand, the data elementsequence is not read out from the bank to which the bank enable signalBE is not generated, and the operation to select the computation dataelements from the data element sequences is not performed.

In FIG. 9, an example is depicted such that the bank enable signal BEindicating the validity of the read-address is not generated. In FIGS.9A through 9C, various kinds of signals depicted in FIG. 8A through 8Care depicted.

In this example, as depicted in FIG. 9A, 8 computation data elements “A”through “H” are stored in scattered manner in the banks 6_2 through 6_4.This example is described in the address order. In the bank 6_3, thedata element sequence R3 including the computation data elements “A” and“B” is stored at the address “0x60”. Also, in the bank 6_4, the dataelement sequence R4 including the computation data elements “C”, “D” and“E” is stored at the address “0x70”. Also, in the bank 6_2, the dataelement sequence R2 including the computation data elements “F”, “G”,and “H” is stored at the address “0x90”. Here, in the bank 6_1, thecomputation data elements are not stored.

Accordingly, as depicted in FIG. 9B, for the bank 6_3, the read-address“0x60” is generated by the address generating unit 30. Also, for thebank 6_4, the read-address “0x70” is generated. Also, for the bank 6_2,the read-address “0x90” is generated. And, for the bank 6_1, aread-address is not generated. Accordingly, the data element sequencesR2 through R4 are read out from the banks 6_2 through 6_4, and the dataelement sequence R1 is not read out from the bank 6_1.

Here, the bank enable signal BEs of the banks 6_2 through 6_4, for whichthe read-address rADDs are generated, have value “1”s indicating thevalidity. On the other hand, the bank enable signal BE of the bank 6_1,for which the read-address rADD is not generated, has a value “0”indicating invalidity. That is, the bank enable signal BE for indicatingthe validity of the read-address rADD is not generated. Such the bankenable signal BE are transferred, and thereby the selector unit 34operates as follows. Further, the element enable signal EEs, and thebank offset signal BOs in FIG. 9B are obtained in the same manner asdescribed in FIG. 8, and the element offset signal EO, the order signalS6, and the position signal S4 s in FIG. 9C are obtained in the samemanner as described in FIG. 8C.

Each of the selectors 34_1 through 34_8 of the selector unit 34, when 24data elements of the data element sequences R2 through R4 are input,performs a process to select the data elements to the data elementsequence R2 through 3 corresponding to the banks 6_2 through 6_4 forwhich the bank enable signal BEs are generated. On the other hand, sincethe data element sequence R1 of the bank 6_1, for which the bank enablesignal BE is not generated, is not input thereto, the selectors 34_1through 34_8 of the selector unit 34 do not perform a processes, whichwere supposed to be performed to the data element sequence R1, to selectthe computation data element. Thereby, waste of electric power and theprocessing load are reduced.

As a result of the above process, as described in FIG. 9D, thecomputation data elements “A” through “H” are stored into the vectorregister 8 in the storing order.

<Example of the Computation Data Elements being Read Out from the VectorRegister 8 and Written into the Data Memory 6>

FIG. 10 is a drawing for depicting the configuration of the memorycontroller for reading a computation data elements from the vectorregister 8 and writing the computation data elements into the datamemory 6. The memory controller has an address generating unit 30 whichgenerates write-address wADDs for the banks 6_1 through 6_4 for writingthe data element sequences R1 through R4. The address generating unit 30is a module, for example, within the load/store pipelines 12_1 and 12_2.The address generating unit 30 generates the write-address wADDs on thebasis of the address generating data 4 a input from the instructiondecoder 4. The address generating unit 30 has, for example, thesequential address generating unit 30_1 which generates write-addresswADDs for the sequential access, the indirect address generating unit30_2 which generates write-address wADDs for the indirect access, andthe stride address generating unit 30_3 which generates thewrite-address wADDs for the stride access. The write-address wADDs forthe banks 6_1 through 6_4 generated by the address generating unit 30are, for example, after being stored in the register 40, input into eachof the banks 6_1 through 6_4 of the data memory 6. On the other hand, atthe address generating unit 30, for example, various kinds of processingsignals PS are generated by the sequential address generating unit 30_1,the indirect address generating unit 30_2, and the stride addressgenerating unit 30_3. Then, the write-address wADDs and various kinds ofprocessing signals PS for the banks 6_1 through 6_4 are stored in theregister 31.

The memory controller has an order/position signal generating unit 32which generates order signal S5 indicating the storing order of thecomputation data elements at the vector register 8, where thecomputation data elements are stored in a processing order of thecomputation pipelines 12_3 and 12_4 so as to be written into the datamemory 6, and generates position signal S7 indicating positions toinsert the data elements, which are to be written into, at the dataelement sequences R1 through R4 to be written into the banks 6_1 through6_4. The order/position signal generating unit 32 is, for example, amodule within the multiplexer 14. The order/position signal generatingunit 32 reads the write-address wADDs and various kinds of processingsignals PS stored in the register 31, and generates, on the basisthereof, the position signal S7 and the order signal S5. The detail willbe described below.

Also, the memory controller has a selector unit 35 which inserts thedata elements in an order indicated by the order signal S5 s intopositions of the data element sequences R1 through R4 to be written intothe banks 6_1 through 6_4, where the positions are indicated by theposition signal S7 s. The selector unit 35 is, for example, includedwithin the multiplexer 14. The selector unit 35 has, for example,selectors 35_1 through 35_32, each corresponding to 32 data elementsincluded in the data element sequences R1 through R4. To each of theselectors 35_1 through 35_32, 8 computation data elements 8 a read outfrom the vector register 8 are input. The computation data elements 8 aare, for example, stored in the register 44, then input into theselectors 35_1 through 35_32. Then, the selectors 35_1 through 35_32each select the computation data elements to be inserted into a positionwhich each selector corresponds to from among 8 computation dataelements 8 a according to the position signal S7 s and the order signalS5 s, and inserts the selected computation data elements into the dataelement sequences R1 through R4.

Further, for example, a data mask signal DM is input from theinstruction decoder 4 to the selector unit 35. The data mask signal DMindicates enablement/disablement of writing the computation dataelements into the data memory 6. The data mask signal DM is, forexample, an 8-bit signal. Each bit indicates the enablement/disablementof writing the 8 data elements 8 a. The data mask signal DM is, forexample, stored in the register 42 and then input into the selector unit35.

The selector unit 35 generates, according to the data mask signal DM, a32-bit data mask signal DM2. The data mask signal DM2 commands the banks6_1 through 6_4 enablement/disablement of writing the data elementsequences R1 through R4. Each bit corresponds to each of the 32 dataelements included in the data element sequences R1 through R4. Theselector unit 35 has 32 units of selectors 36_1 through 36_32 generatingthe data mask signal DM2. The selectors 36_1 through 36_32 eachcorrespond to each of the 32 data elements included in the data elementsequences R1 through R4. To each of the selectors 36_1 through 36_32,8-bit data mask signal DM is input. Then, each of the selectors 36_1through 36_32 generates, according to the position signal S7 s and theorder signal S5 s, a value (“1” or “0”) indicating theenablement/disablement of insertion of the data elements to a positionwhich each selector corresponds. Thereby, the 8-bit data mask signal DM2is generated. The data mask signal DM2 is input into the banks 6_1through 6_4.

At the banks 6_1 through 6_4 of the data memory 6, the data elementsequences R1 through R4 are written into the write-address wADDs. Atthat time, the data elements enabled by the data mask signal DM2 arewritten. By using the data mask signal DM2, damage to the data andinconsistency of the data at the data memory 6 are avoided.

FIG. 11 is a drawing for depicting detailed operations of theorder/position signal generating unit 32. In FIG. 11A, the write-addresswADDs generated by the address generating unit 30 for each of the banks6_1 through 6_4 are depicted. For example, for the bank 6_1, thewrite-address “0x40” is generated. Also, for the bank 6_2, thewrite-address “0x50” is generated. Also, for the bank 6_3, thewrite-address “0x60” is generated. Then, for the bank 6_4, thewrite-address “0x30” is generated.

The above write-address wADDs are for writing the data element sequencesR1 through R4 into the banks 6_1 through 6_4 as depicted in FIG. 11E. 8computation data elements “A”, “B”, “C”, “D”, “E”, “F”, “G”, and “H” areincluded in the data element sequences R1 through R4. Here, the addressascends along the directions from the right to left, and from the top tobottom of the drawing. The address order of the computation dataelements “A” through “H” written into the banks 6_1 through 6_4corresponds to the storing order at the vector register 8, or theprocessing order by the computation pipelines 12_3 and 12_4.

Also, in FIG. 11A, various kinds of processing signals PS generated bythe address generating unit 30 are depicted. The various kinds ofprocessing signals PS include the bank enable signal BEs, the elementenable signal EEs, and the bank offset signal BOs.

The bank enable signal BEs, the element enable signal EEs, and the bankoffset signal BOs are generated according to the write-address wADD.

The bank enable signal BE indicates the validity of the write-addresswADD at each of the banks 6_1 through 6_4. The bank enable signal BE is,for example, a 1-bit signal.

When the write-address wADD is generated, the bank enable signal BE hasthe value “1” indicating the validity. On the other hand, when thewrite-address rADD is not generated, the bank enable signal BE has thevalue “0”. Here, at all the banks 6_1 through 6_4, the write-addresswADDs are generated. Accordingly, for all the banks 6_1 through 6_4, thebank enable signal BE, having the value “1” indicating the validity ofthe write-address wADD, is generated

The element enable signal EE indicates positions to insert thecomputation data elements at each of the data element sequence R1through R4. For example, as depicted in FIG. 11D, the computation dataelements “B” and “C” are respectively inserted into the first and thesecond columns of the data element sequence R1. Accordingly, the valueof the element enable signal EE is, from the first to the eighth column,“1, 1, 0, 0, 0, 0, 0, 0”. Also, to the data element sequence R2, thecomputation data elements “D”, “E”, and “F” are inserted at the secondto the fourth columns. Accordingly, the value of the element enablesignal EE corresponding to the data element sequence R2 is, from thefirst to eighth columns, “0, 1, 1, 1, 0, 0, 0, 0”. Also, to the dataelement sequence R3, the computation data elements “G” and “H” areinserted at the fourth and the fifth columns. Accordingly, the value ofthe element enable signal corresponding to the data element sequence R3is, from the first to eighth columns, “0, 0, 0, 1, 1, 0, 0, 0”. Then,computation data element “A” is inserted into the eighth column of thedata element sequence R4. Accordingly, the value of the element enablesignal EE corresponding to the data element sequence R4 is, from thefirst to eighth columns, “0, 0, 0, 0, 0, 0, 0, 1”.

The bank offset signal BO indicates the order of each of the banks 6_1through 6_4, corresponding to the order of the computation data elementsto be inserted into the data element sequences R1 through R4. The valueof the bank offset signal BO is obtained from the accumulated value ofthe order of the read-address wADD of each of the banks 6_1 through 6_4,and the element enable signal EE. An example is as depicted as in FIG.8B.

In FIG. 11B, the element offset signal EO, the order signal S5, and theposition signal S7 for each of the banks 6_1 through 6_4, generated bythe order/position signal generating unit 32, are depicted. The elementoffset signal EO indicates the order of the computation data elements tobe inserted into each of the data element sequences R1 through R4. Thevalue of the element offset signal EO is obtained by accumulating thevalue of the element enable signal EE in order of the address at each ofthe banks 6_1 through 6_4. An example is as depicted in FIG. 8C.

The order signal S5 indicates the storing position of the computationdata elements at the vector register 8. Correspondence relations betweenthe storing order “1” through “8” and the computation data elements “A”through “H” at the vector register 8 are depicted in FIG. 11C. Also, inFIG. 11C, the data mask signal DM, which defines enablement/disablementof writing of each of the computation data element, is depicted. Thevalue of the order signal S5 is obtained as a sum of the value of thebank offset signal BO for the bank to which the computation data elementcorresponds, and the value of the element offset signal EO of thecomputation data element. An example is as depicted in FIG. 8C.

Here, to the computation data elements “A”, “B”, “C”, “D”, “E”, “F”,“G”, and “H”, the order “1”, “2”, “3”, “4”, “5”, “6”, “7”, and “8” forstoring in the vector register 8 are associated.

The position signal S7 s indicate positions of the computation dataelements “A” through “H” to be inserted, at 32 data elements of the dataelement sequence R1 through R4. For example, 32 data elements arearranged in the address order such as the data element sequence R1, R2,R3, and R4, and the values from “0” through “31” are assigned thereto inascending order. Then, to each of the computation data elements “A”through “H”, to which the order signal S5 is assigned, any of thecorresponding position signals “1” through “32” is assigned. An exampleis described as follows.

<Data Element Sequence R1>

-   the computation data element “B” to be inserted: the order signal    “2”, and the position signal “0”-   the computation data element “C” to be inserted: the order signal    “3”, and the position signal “1”    <Data Element Sequence R2>-   the computation data element “D” to be inserted: the order signal    “4”, and the position signal “9”-   the computation data element “E” to be inserted: the order signal    “5”, and the position signal “10”-   the computation data element “F” to be inserted: the order signal    “6”, and the position signal “11”    <Data Element Sequence R3>-   the computation data element “G” to be inserted: the order signal    “7”, the position signal “19”-   the computation data element “H” to be inserted: the order signal    “8”, and the position signal “20”    <Data Element Sequence R4>-   the computation data element “A” to be inserted: the order signal    “1”, and the position signal “31”

Here, the computation data elements “A”, “B”, “C”, “D”, “E”, “F”, “G”,and “H”, the order for storing in the vector register 8, such as “1”,“2”, “3”, “4”, “5”, “6”, “7”, and “8”, and the insertion position at thedata elements R1, R2, R3, and R4 are associated with one another.

Below, with reference to FIG. 10 and FIG. 11, operations of the selectorunit 35 will be explained. The selector unit 35 inserts the dataelements into positions, which the position signal S7 s indicate, at thedata element sequences R1 through R4 to be written into the plurality ofthe banks 6_1 through 6_4 in an order which the order signal S5 sindicate. An example is as described below.

Each of the selectors 35_1 through 35_32 corresponds to the positions“0” through “31” of 32 data elements at the data element sequences R1through R4. To the selectors 35_1 through 35_32, 8 computation dataelements 8 a read out from the vector register 8, that is “A” through“H”, are input. Then, the selectors 35_1 through 35_32 select thecomputation data elements to insert into a position, which each of theselectors corresponds to, from among 8 computation data elements 8 aaccording to the position signal S7 s and the order signal S5 s, andinsert the selected computation data elements into the data elementsequences R1 through R4. For example, among the selectors 35_1 through35_32, the correspondence relations of the value of the order signal S5s to insert the computation data elements “A” through “H”, the values ofthe position signal S7 s, and the data elements to be inserted are asfollows.

<Selector 35_2>

-   the order signal “2”—the position signal “0”—the computation data    element “B”    <Selector 35_3>-   the order signal “3”—the position signal “1”—the computation data    element “C”    <Selector 35_9>-   the order signal “4”—the position signal “9”—the computation data    element “D”    <Selector 35_10>-   the order signal “5”—the position signal “10”—the computation data    element “E”    <Selector 35_11>-   the order signal “6”—the position signal “11”—the computation data    element “F”    <Selector 35_19>-   the order signal “7”—the position signal “19”—the computation data    element “G”    <Selector 35_20>-   the order signal “8”—the position signal “20”—the computation data    element “H”    <Selector 35_31>-   the order signal “1”—the position signal “31”—the computation data    element “A”    Also, other selectors than the above such as the selector 35_1, 35_4    through 8, 35_12 through 35_18, and 35_21 through 35_30,    corresponding to the order signal “0”s, and not corresponding to the    computation data elements to be inserted, do not perform the    insertion. As above, the computation data elements “A” through “H”    read out from the vector register 8 are inserted into the data    element sequences R1 through R4.

In FIG. 11D, the data sequences R1 through R4 with the computation dataelements “A” through “H” inserted thereto are depicted. Also, in FIG.11D, the data mask signal DM2 generated from the data mask signal DM ofFIG. 11C is depicted. The data mask signal DM2 is a 32-bit signal. Thebit value corresponding to the data element enabled for writing is “0”,and the bit value corresponding to the data element disabled for writingis “1”. Here, an example is depicted such that the writing of the dataelement “B”, “D”, and “F” are disabled.

As above, the data element sequences R1 through R4 which are insertedwith the computation data elements “A” through “H” are, as depicted inFIG. 11E, written into the banks 6_1 through 6_4 by a single access.Accordingly, the latency is reduced. Also, at that time, byenabling/disabling the writing of the element data, data at the datamemory 6 are protected. Further, in FIG. 11E, “X”s are marked at thecomputation data elements which are disabled for writing. Also, on theother hand, the computation pipelines 12_3 and 12_4 consecutivelyprocess the data elements and output the computation results, thus thepipeline stall is reduced. Accordingly, a preferable throughput isobtained.

Additionally, the order/position signal generating unit 32 transfers tothe selector unit 35 the bank enable signal BE sent from the addressgenerating unit 30. The selector unit 35 inserts the computation dataelements into the data element sequence to be written into the bank forwhich the bank enable signal BE is generated. On the other hand, theselector unit 35 does not insert the computation data elements into thebank for which the bank enable signal BE is not generated, since thedata element sequence is not written thereinto.

In FIG. 12, an example is described such that the bank enable signal BEindicating the validity of the write-address is not generated. In FIG.12A through 12E, various kinds of signals depicted in FIG. 11A through11E are depicted.

In this example, as depicted in FIG. 12E, 8 computation data elements“A” through “H” are written in scattered manner into the bank 6_2through 6_4. For example, as depicted in the address order, the dataelement sequence R3 including the computation data elements “A” and “B”are written into the bank 6_3 at the address “0x60”. Also, into the bank6_4, the data element sequence R4 including the computation dataelements “C”, “D”, and “E” are written at the address “0x70”.

Also, into the bank 6_2, the data element sequence R2 including thecomputation data elements “F”, “G”, and “H” are written at the address“0x90”. Then, into the bank 6_1, no data elements is written.

Accordingly, as depicted in FIG. 12A, by the address generating unit 30,the write-addresses “0x90”, “0x60”, and “0x70” are generatedrespectively for the bank 6_2, 6_3, and 6_4. Then, for the bank 6_1, nowrite-address is generated. Accordingly, the bank enable signal BEs forany of the bank 6_2 through 6_4, for which the write-address wADD isgenerated, have the value “1”s indicating the validity. On the otherhand, however, the bank enable signal BE for the bank 6_1, for which nowrite-address wADD is generated, has the value “0” indicating theinvalidity. That is, no bank enable signal BE for indicating thevalidity of the write-address wADD is generated.

By such the bank enable signal BE being transferred, the selector unit35 operates as described below. Further, the element enable signal EEs,and the bank offset signal BOs in FIG. 12A are obtained in the samemanner as described in FIG. 11A, and the element offset signal EOs, theorder signal S5 s, and the position signal S7 s of FIG. 12B are obtainedin the same manner as described in FIG. 11B.

The selectors 35_1 through 35_32 of the selector unit 35 insert theelement data, when 8 computation data elements “A” through “H” are inputthereto, into the data element sequence R2 through 3 corresponding tothe bank 6_2 through 6_4 where the bank enable signal BEs are generated,according to the order signal S5 s and the position signal S7 s depictedin FIG. 12B. On the other hand, however, the selector 35_1 through 32does not insert the data elements into the data element sequence R1corresponding to the bank 6_1, for which the bank enable signal BE isnot generated. Thereby, waste of electrical power and process load arereduced.

As a result of the above, the computation data elements stored in thevector register 8, as depicted in FIG. 12C, are written into each bankof the data memory 6, as depicted in FIG. 12E. Also, at that time,writing the computation data elements is enabled/disabled by the datamask signal DM depicted in FIG. 12C.

The vector processor 1 as described above is, for example, applied to asignal processor installed in a mobile communication device, andprocessing FFT (Fast Fourier Transforms) or the like with base bandsignal as the element data. Alternatively, for example, application isalso possible to an image processing apparatus for image processing withpixel data as the element data. According to the present embodiment, inreading/writing the data elements in the data memory by accessingdiscontinuous address thereof, a preferable throughput is obtained evenby a minimum circuit configuration.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the embodimentsand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the embodiments. Although the embodiments have beendescribed in detail, it should be understood that the various changes,substitutions, and alterations could be made hereto without departingfrom the spirit and scope of the invention.

What is claimed is:
 1. A memory controller comprising: a firstgenerating unit that generates a read-address to read a data elementsequence having a plurality of data elements from a bank of a memory,the memory having a plurality of the banks, from each of which the dataelement sequence is read out in response to an input of theread-address; a second generating unit that generates a position signalindicating a position of a data element to be selected from the dataelement sequence, and an order signal indicating a storing order forstoring the data element to be selected into a register; and a selectorunit that selects, according to the position signal, the data element tobe selected from the data element sequence read out from each of theplurality of the banks, and stores the selected data element in thestoring order indicated by the order signal into the register, whereinthe data element stored in the register is processed in the storingorder by a vector processor.
 2. The memory controller according to claim1, wherein the first generating unit further generates an enable signalindicating a validity of the read-address, and the selector unit selectsthe data elements to be selected from the data element sequence read outfrom the bank for which the enable signal is generated, and does notselect the data elements to be selected from the data element sequenceread out from the bank for which the enable signal is not generated. 3.The memory controller according to claim 1, wherein the order of theread-address of each of the plurality of the banks corresponds to thestoring order of the data elements to be selected included within thedata element sequence read out at the read-address, and the secondgenerating unit generates the order signal according to a first offsetsignal which is generated according to the read-address of each of thebanks and indicates an order of the data element sequence read out fromthe plurality of the banks, and a second offset signal indicating anorder of the data elements to be selected from each of the data elementsequences read out from each of the plurality of the banks.
 4. A memorycontroller comprising: a first generating unit that generates awrite-address to write a data element sequence having a plurality ofdata elements into a bank of a memory, the memory having a plurality ofthe banks, into each of which the data element sequence is written inresponse to an input of the write-address; a second generating unit thatgenerates an order signal indicating a storing order at the register ofa data element to be written into the memory, the data elements beginstored in the register in a processing order of a vector processor, andgenerates a position signal indicating a position to insert the dataelement to be written into the data element sequence to be written intoeach of the plurality of the banks; and a selector unit that inserts thedata elements into the plurality of the banks indicated by the positionsignal in an order indicated by the order signal, wherein the dataelement sequence including the data element to be written is written atthe write-address of each of the banks.
 5. The memory controlleraccording to claim 4, wherein the first generating unit furthergenerates an enable signal indicating a validity of the write-address,and the selector unit inserts the data element to be written into thedata element sequence which is written into the bank for which theenable signal is generated, and does not insert the data element to bewritten into the data element sequence which is written into the bankfor which the enable signal is not generated.
 6. The memory controlleraccording to claim 4, wherein the selector unit inserts, according to amask signal indicating enablement/disablement of writing of the dataelement, the data element enabled to be written into the data elementsequence to be written into the plurality of the banks, and does notinsert the data element disabled for writing into the data elementsequence to be written into the plurality of the banks.
 7. The memorycontroller according to claim 4, wherein an order of the write-addressof each of the banks corresponds to the storing order of the dataelement included within the data element sequence to be written into thewrite-address, and the second generating unit generates a first offsetsignal indicating an order of the data element sequence written into theplurality of the banks, which is generated on the basis of thewrite-address of each of the banks, and a second offset signalindicating an order of the data elements to be written for each of thedata element sequence to be written into each of the plurality of thebanks.
 8. A memory controlling method comprising: generating aread-address to read a data element sequence having a plurality of dataelements from a bank of a memory, the memory having a plurality of thebanks, from each of which the data element sequence is read out inresponse to an input of the read-address; generating a position signalindicating a position of the data element to be selected from the dataelement sequence; generating an order signal indicating a storing orderfor storing the data elements to be selected into a register; selecting,according to the position signal, the data element to be selected fromthe data element sequence read out from each of the plurality of thebanks; and storing the selected data element in a storing orderindicated by the order signal into the register, wherein the dataelement stored in the register is processed in the storing order by thevector processor.
 9. A memory controlling method comprising: generatinga write-address to write a data element sequence having a plurality ofdata elements into a bank of a memory, the memory having a plurality ofthe banks, into each of which the data element sequence is written inresponse to an input of the write-address; generating an order signalindicating a storing order at the register of the data elements to bewritten into the memory, the data elements begin stored in the registerin a processing order of the vector processor; generating a positionsignal indicating a position to insert the data elements into the dataelement sequence to be written into each of the plurality of the banks;and inserting the data element into the plurality of the bank indicatedby the position signal in an order indicated by the order signal,wherein the data element sequence including the data element to bewritten is written at the write-address of each of the banks.